package convert

import (
	"bytes"
	"encoding/binary"
)

// convert bytes  to int8
func BytesToInt8(b []byte) int8 {
	buffer := bytes.NewBuffer(b)
	var x int8
	binary.Read(buffer,binary.BigEndian,&x)
	return x
}

// convert bytes to uint8
func BytesToUint8(b []byte) uint8 {
	buffer := bytes.NewBuffer(b)
	var x uint8
	binary.Read(buffer,binary.BigEndian,&x)
	return x
}
